package week06.day02;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Scanner;

public class 上机练习1 {
    public static void main(String[] args) {
        for (int i=100;i<=999;i++){
            boolean flag = shuixianhua(i);
            if (flag){
                System.out.println(i);
            }
        }
    }
    public static boolean shuixianhua(int num) {
        int a = num / 100;
        int b = num / 10 % 10;
        int c = num % 10;
        if (num == (a * a * a) + (b * b * b) + (c * c * c)) {
            return true;
        }
        return false;
    }
}
